package com.zhentao.controller;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zhentao.domain.YdPerson;
import com.zhentao.service.YdPersonService;
import com.zhentao.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("person")
public class PersonController {

    @Autowired
    private YdPersonService ydPersonService;

    @GetMapping("personList")
    public Result personList() {
        return Result.success(ydPersonService.list(Wrappers.<YdPerson>lambdaQuery().eq(YdPerson::getType,"财务员")));
    }
}
